﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace DigitalGenetics
{
    public partial class SumMatrix
    {
        static private List<SolidBrush> SmBrushList;
        static private SolidBrush[] greyBrushArray;
        static public SolidBrush[] GreyBrushArray
        {
            get
            {
                if (greyBrushArray == null)
                {
                    greyBrushArray = initSmBrush();
                }
                return greyBrushArray;
            }
        }
        static private SolidBrush[] initSmBrush()
        {
            if (SmBrushList == null)
            {
                SmBrushList = new List<SolidBrush>(256);
                for (int i = 0; i < 256; i++)
                {
                    SmBrushList.Add(GetSmBrush(i));
                }
            }
            return SmBrushList.ToArray();
        }

        static public double[] BrushMask = new double[] { 1, 1, 1, 1 }; // ARGB
        static private SolidBrush GetSmBrush(int a)
        {
            return new SolidBrush(
                Color.FromArgb(
                (int)(0xff * BrushMask[0]),
                (int)(a * BrushMask[1]),
                (int)(a * BrushMask[2]),
                (int)(a * BrushMask[3])));
        }

    }
}
